import {orderRequest,cloudOrderRequest} from "@/utils/HttpRequest";


export async function findByPageOrderList(params?: any) {
  //SwaggerResources


  return orderRequest<API.LoginLog> (
    "findByPageList", {
      method: "GET", params: {...params}
    } )


}


export async function findByOrderDetailList(orderId?: number) {
  //SwaggerResources


  return orderRequest<API.LoginLog> (
    "findByOrderDetailList", {
      method: "GET", params: {orderId: orderId}
    } )


}


export async function cancelOrder(orderId?: number) {
  return orderRequest<API.BaseResult> ( "cancelOrder", {
    method: "POST",
    params: {orderId: orderId}
  })
}

export async function shipments(orderId?: number,postNum?:string) {
  return orderRequest<API.BaseResult> ( "shipments", {
    method: "POST",
    params: {orderId: orderId,postNum:postNum}
  } )
}
export async function shenhePayment(orderId?: number,datas?:any[]) {
  return orderRequest<API.BaseResult> ( "shenhePayment", {
    method: "POST",
 //   params: {orderId: orderId},
    data:{orderId: orderId,datas:datas}
  } )
}




export async function adminPayment(orderId?: number) {
  return orderRequest<API.BaseResult> ( "adminPayment", {
    method: "POST",
    params: {orderId: orderId}
  } )
}
export async function cloudDeliveryPayment(orderId?: number) {
  return orderRequest<API.BaseResult> ( "cloudDelivery", {
    method: "POST",
    params: {orderId: orderId}
  } )
}





export async function findByPageConsignerOrderList(params?: any) {
  //SwaggerResources


  return cloudOrderRequest<API.LoginLog> (
    "findByPageList", {
      method: "GET", params: {...params}
    } )


}


export async function findByOrderConsignerDetailList(orderId?: number) {
  //SwaggerResources


  return cloudOrderRequest<API.LoginLog> (
    "findByOrderDetailList", {
      method: "GET", params: {orderId: orderId}
    } )


}


export async function cancelConsignerOrder(orderId?: number) {
  return cloudOrderRequest<API.BaseResult> ( "cancelOrder", {
    method: "POST",
    params: {orderId: orderId}
  } )
}


export async function adminConsignerPayment(orderId?: number) {
  return cloudOrderRequest<API.BaseResult> ( "adminPayment", {
    method: "POST",
    params: {orderId: orderId}
  } )
}

export async function shipmentsConsigner(orderId?: number,postNum?:string) {
  return cloudOrderRequest<API.BaseResult> ( "shipments", {
    method: "POST",
    params: {orderId: orderId,postNum:postNum}
  } )
}

export async function cloudEdit(params?: any) {
  return cloudOrderRequest<API.BaseResult> ( "edit", {
    method: "POST",
    params: {...params}
  } )
}

export async function createBackOrder(params?: any) {
  return orderRequest<API.BaseResult> ( "createBackOrder", {
    method: "POST",
    data: {...params}
  } )
}







